<%@ page import="zhangcy.day0109.qingyoutravel.dao.TourRouteDao" %>
<%@ page import="zhangcy.day0109.qingyoutravel.dao.impl.TourRouteDaoImpl" %>
<%@ page import="java.util.List" %>
<%@ page import="zhangcy.day0109.qingyoutravel.po.TourRoute" %>
<%@ page import="zhangcy.day0109.qingyoutravel.constants.TourRouteStatus" %><%--
  Created by IntelliJ IDEA.
  User: 小香菜
  Date: 2023/1/9
  Time: 20:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8"/>
    <title>青游旅行社服务平台</title>
    <link rel="stylesheet" href="../../../css/zhangcy/day0110/service-platform.css" type="text/css">
    <%
        TourRouteDao tourRouteDao = new TourRouteDaoImpl();
        List<TourRoute> tourRouteList = tourRouteDao.queryAllTourRoutes();
    %>
</head>
<body>
<div id="container">
    <header>
        <h1>青游旅行社服务平台</h1>
    </header>
    <div id="main_center">
        <form action="">
            <div id="addRoute">
                <a href="add-information.jsp"><input type="button" value="添加"></a>
            </div>
            <table>
                <thead>
                <tr>
                    <th>旅游线路名称</th>
                    <th>类型</th>
                    <th>价格(元)</th>
                    <th>咨询电话</th>
                    <th>咨询人</th>
                    <th>创建日期</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <%
                    for (int i = 0; i < tourRouteList.size(); i++) {
                %>
                <tr>
                    <td><%=tourRouteList.get(i).getTrName()%></td>
                    <td><%=TourRouteStatus.getTourRouteStatusByCode(tourRouteList.get(i).getTrType()).getValue()%></td>
                    <td><%=tourRouteList.get(i).getTrPrice()%></td>
                    <td><%=tourRouteList.get(i).getTrPhone()%></td>
                    <td><%=tourRouteList.get(i).getTrUser()%></td>
                    <td><%=tourRouteList.get(i).getCreateTime()%></td>
                    <td>
                        <a href="">详情</a>&nbsp;&nbsp;&nbsp;
                        <a href="javascript:void(0);" class="del">删除</a>
                    </td>
                </tr>
                <%
                    }
                %>
                </tbody>
            </table>
        </form>
    </div>
</div>
</body>
</html>
